<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Data.Char</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2001</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- </span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   :  stable</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- The Char type and associated operations.</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Char</span><span>
</span><span id="line-19"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-20"></span><span>      </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier">Char</span></a></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Character classification</span></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-comment">-- | Unicode characters are divided into letters, numbers, marks,</span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-comment">-- punctuation, symbols, separators (including spaces) and others</span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-comment">-- (including control characters).</span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isControl"><span class="hs-identifier">isControl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isSpace"><span class="hs-identifier">isSpace</span></a></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isLower"><span class="hs-identifier">isLower</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isUpper"><span class="hs-identifier">isUpper</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isAlpha"><span class="hs-identifier">isAlpha</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isAlphaNum"><span class="hs-identifier">isAlphaNum</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isPrint"><span class="hs-identifier">isPrint</span></a></span><span>
</span><span id="line-28"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isDigit"><span class="hs-identifier">isDigit</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isOctDigit"><span class="hs-identifier">isOctDigit</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isHexDigit"><span class="hs-identifier">isHexDigit</span></a></span><span>
</span><span id="line-29"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Char.html#isLetter"><span class="hs-identifier">isLetter</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Char.html#isMark"><span class="hs-identifier">isMark</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Char.html#isNumber"><span class="hs-identifier">isNumber</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isPunctuation"><span class="hs-identifier">isPunctuation</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isSymbol"><span class="hs-identifier">isSymbol</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Char.html#isSeparator"><span class="hs-identifier">isSeparator</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Subranges</span></span><span>
</span><span id="line-32"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isAscii"><span class="hs-identifier">isAscii</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isLatin1"><span class="hs-identifier">isLatin1</span></a></span><span>
</span><span id="line-33"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isAsciiUpper"><span class="hs-identifier">isAsciiUpper</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isAsciiLower"><span class="hs-identifier">isAsciiLower</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Unicode general categories</span></span><span>
</span><span id="line-36"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#GeneralCategory"><span class="hs-identifier">GeneralCategory</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#generalCategory"><span class="hs-identifier">generalCategory</span></a></span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Case conversion</span></span><span>
</span><span id="line-39"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#toUpper"><span class="hs-identifier">toUpper</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#toLower"><span class="hs-identifier">toLower</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#toTitle"><span class="hs-identifier">toTitle</span></a></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Single digit characters</span></span><span>
</span><span id="line-42"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Char.html#digitToInt"><span class="hs-identifier">digitToInt</span></a></span><span>
</span><span id="line-43"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Show.html#intToDigit"><span class="hs-identifier">intToDigit</span></a></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Numeric representations</span></span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#ord"><span class="hs-identifier">ord</span></a></span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Char.html#chr"><span class="hs-identifier">chr</span></a></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span>    </span><span class="annot"><span class="hs-comment">-- * String representations</span></span><span>
</span><span id="line-50"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Show.html#showLitChar"><span class="hs-identifier">showLitChar</span></a></span><span>
</span><span id="line-51"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Read.html#lexLitChar"><span class="hs-identifier">lexLitChar</span></a></span><span>
</span><span id="line-52"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Read.html#readLitChar"><span class="hs-identifier">readLitChar</span></a></span><span>
</span><span id="line-53"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Char.html"><span class="hs-identifier">GHC.Char</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Real.html"><span class="hs-identifier">GHC.Real</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier">fromIntegral</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Read.html"><span class="hs-identifier">GHC.Read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Read.html#readLitChar"><span class="hs-identifier">readLitChar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Read.html#lexLitChar"><span class="hs-identifier">lexLitChar</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unicode.html"><span class="hs-identifier">GHC.Unicode</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-comment">-- $setup</span><span>
</span><span id="line-64"></span><span class="hs-comment">-- Allow the use of Prelude in doctests.</span><span>
</span><span id="line-65"></span><span class="hs-comment">-- &gt;&gt;&gt; import Prelude</span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span class="hs-comment">-- | Convert a single digit 'Char' to the corresponding 'Int'.  This</span><span>
</span><span id="line-68"></span><span class="hs-comment">-- function fails unless its argument satisfies 'isHexDigit', but</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- recognises both upper- and lower-case hexadecimal digits (that</span><span>
</span><span id="line-70"></span><span class="hs-comment">-- is, @\'0\'@..@\'9\'@, @\'a\'@..@\'f\'@, @\'A\'@..@\'F\'@).</span><span>
</span><span id="line-71"></span><span class="hs-comment">--</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-73"></span><span class="hs-comment">--</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- Characters @\'0\'@ through @\'9\'@ are converted properly to</span><span>
</span><span id="line-75"></span><span class="hs-comment">-- @0..9@:</span><span>
</span><span id="line-76"></span><span class="hs-comment">--</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- &gt;&gt;&gt; map digitToInt ['0'..'9']</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- [0,1,2,3,4,5,6,7,8,9]</span><span>
</span><span id="line-79"></span><span class="hs-comment">--</span><span>
</span><span id="line-80"></span><span class="hs-comment">-- Both upper- and lower-case @\'A\'@ through @\'F\'@ are converted</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- as well, to @10..15@.</span><span>
</span><span id="line-82"></span><span class="hs-comment">--</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- &gt;&gt;&gt; map digitToInt ['a'..'f']</span><span>
</span><span id="line-84"></span><span class="hs-comment">-- [10,11,12,13,14,15]</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- &gt;&gt;&gt; map digitToInt ['A'..'F']</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- [10,11,12,13,14,15]</span><span>
</span><span id="line-87"></span><span class="hs-comment">--</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- Anything else throws an exception:</span><span>
</span><span id="line-89"></span><span class="hs-comment">--</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- &gt;&gt;&gt; digitToInt 'G'</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- *** Exception: Char.digitToInt: not a digit 'G'</span><span>
</span><span id="line-92"></span><span class="hs-comment">-- &gt;&gt;&gt; digitToInt '&#9829;'</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- *** Exception: Char.digitToInt: not a digit '\9829'</span><span>
</span><span id="line-94"></span><span class="hs-comment">--</span><span>
</span><span id="line-95"></span><span class="annot"><a href="Data.Char.html#digitToInt"><span class="hs-identifier hs-type">digitToInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-96"></span><span id="digitToInt"><span class="annot"><span class="annottext">digitToInt :: Char -&gt; Int
</span><a href="Data.Char.html#digitToInt"><span class="hs-identifier hs-var hs-var">digitToInt</span></a></span></span><span> </span><span id="local-6989586621679533623"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533623"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-97"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679533622"><span class="hs-identifier hs-var">dec</span></a></span><span class="hs-glyph">::</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word -&gt; Word -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><span class="hs-number">9</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679533622"><span class="hs-identifier hs-var">dec</span></a></span><span>
</span><span id="line-98"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679533620"><span class="hs-identifier hs-var">hexl</span></a></span><span class="hs-glyph">::</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word -&gt; Word -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><span class="hs-number">5</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679533620"><span class="hs-identifier hs-var">hexl</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-99"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679533618"><span class="hs-identifier hs-var">hexu</span></a></span><span class="hs-glyph">::</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word -&gt; Word -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word
</span><span class="hs-number">5</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679533618"><span class="hs-identifier hs-var">hexu</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-100"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Int
forall a. [Char] -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;Char.digitToInt: not a digit &quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533623"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- sigh</span><span>
</span><span id="line-101"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-102"></span><span>    </span><span id="local-6989586621679533622"><span class="annot"><span class="annottext">dec :: Int
</span><a href="#local-6989586621679533622"><span class="hs-identifier hs-var hs-var">dec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533623"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span>
</span><span id="line-103"></span><span>    </span><span id="local-6989586621679533620"><span class="annot"><span class="annottext">hexl :: Int
</span><a href="#local-6989586621679533620"><span class="hs-identifier hs-var hs-var">hexl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533623"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'a'</span></span><span>
</span><span id="line-104"></span><span>    </span><span id="local-6989586621679533618"><span class="annot"><span class="annottext">hexu :: Int
</span><a href="#local-6989586621679533618"><span class="hs-identifier hs-var hs-var">hexu</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533623"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'A'</span></span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span class="hs-comment">-- derived character classifiers</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- | Selects alphabetic Unicode characters (lower-case, upper-case and</span><span>
</span><span id="line-109"></span><span class="hs-comment">-- title-case letters, plus letters of caseless scripts and</span><span>
</span><span id="line-110"></span><span class="hs-comment">-- modifiers letters). This function is equivalent to</span><span>
</span><span id="line-111"></span><span class="hs-comment">-- 'Data.Char.isAlpha'.</span><span>
</span><span id="line-112"></span><span class="hs-comment">--</span><span>
</span><span id="line-113"></span><span class="hs-comment">-- This function returns 'True' if its argument has one of the</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- following 'GeneralCategory's, or 'False' otherwise:</span><span>
</span><span id="line-115"></span><span class="hs-comment">--</span><span>
</span><span id="line-116"></span><span class="hs-comment">-- * 'UppercaseLetter'</span><span>
</span><span id="line-117"></span><span class="hs-comment">-- * 'LowercaseLetter'</span><span>
</span><span id="line-118"></span><span class="hs-comment">-- * 'TitlecaseLetter'</span><span>
</span><span id="line-119"></span><span class="hs-comment">-- * 'ModifierLetter'</span><span>
</span><span id="line-120"></span><span class="hs-comment">-- * 'OtherLetter'</span><span>
</span><span id="line-121"></span><span class="hs-comment">--</span><span>
</span><span id="line-122"></span><span class="hs-comment">-- These classes are defined in the</span><span>
</span><span id="line-123"></span><span class="hs-comment">-- &lt;http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_Table Unicode Character Database&gt;,</span><span>
</span><span id="line-124"></span><span class="hs-comment">-- part of the Unicode standard. The same document defines what is</span><span>
</span><span id="line-125"></span><span class="hs-comment">-- and is not a \&quot;Letter\&quot;.</span><span>
</span><span id="line-126"></span><span class="hs-comment">--</span><span>
</span><span id="line-127"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-128"></span><span class="hs-comment">--</span><span>
</span><span id="line-129"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-130"></span><span class="hs-comment">--</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- &gt;&gt;&gt; isLetter 'a'</span><span>
</span><span id="line-132"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-133"></span><span class="hs-comment">-- &gt;&gt;&gt; isLetter 'A'</span><span>
</span><span id="line-134"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-135"></span><span class="hs-comment">-- &gt;&gt;&gt; isLetter '&#955;'</span><span>
</span><span id="line-136"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-137"></span><span class="hs-comment">-- &gt;&gt;&gt; isLetter '0'</span><span>
</span><span id="line-138"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- &gt;&gt;&gt; isLetter '%'</span><span>
</span><span id="line-140"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-141"></span><span class="hs-comment">-- &gt;&gt;&gt; isLetter '&#9829;'</span><span>
</span><span id="line-142"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-143"></span><span class="hs-comment">-- &gt;&gt;&gt; isLetter '\31'</span><span>
</span><span id="line-144"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-145"></span><span class="hs-comment">--</span><span>
</span><span id="line-146"></span><span class="hs-comment">-- Ensure that 'isLetter' and 'isAlpha' are equivalent.</span><span>
</span><span id="line-147"></span><span class="hs-comment">--</span><span>
</span><span id="line-148"></span><span class="hs-comment">-- &gt;&gt;&gt; let chars = [(chr 0)..]</span><span>
</span><span id="line-149"></span><span class="hs-comment">-- &gt;&gt;&gt; let letters = map isLetter chars</span><span>
</span><span id="line-150"></span><span class="hs-comment">-- &gt;&gt;&gt; let alphas = map isAlpha chars</span><span>
</span><span id="line-151"></span><span class="hs-comment">-- &gt;&gt;&gt; letters == alphas</span><span>
</span><span id="line-152"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-153"></span><span class="hs-comment">--</span><span>
</span><span id="line-154"></span><span class="annot"><a href="Data.Char.html#isLetter"><span class="hs-identifier hs-type">isLetter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-155"></span><span id="isLetter"><span class="annot"><span class="annottext">isLetter :: Char -&gt; Bool
</span><a href="Data.Char.html#isLetter"><span class="hs-identifier hs-var hs-var">isLetter</span></a></span></span><span> </span><span id="local-6989586621679533612"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533612"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char -&gt; GeneralCategory
</span><a href="GHC.Unicode.html#generalCategory"><span class="hs-identifier hs-var">generalCategory</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533612"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-156"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#UppercaseLetter"><span class="hs-identifier hs-var">UppercaseLetter</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-157"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#LowercaseLetter"><span class="hs-identifier hs-var">LowercaseLetter</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-158"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#TitlecaseLetter"><span class="hs-identifier hs-var">TitlecaseLetter</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-159"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#ModifierLetter"><span class="hs-identifier hs-var">ModifierLetter</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-160"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#OtherLetter"><span class="hs-identifier hs-var">OtherLetter</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-161"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><span class="hs-identifier">_</span></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span class="hs-comment">-- | Selects Unicode mark characters, for example accents and the</span><span>
</span><span id="line-164"></span><span class="hs-comment">-- like, which combine with preceding characters.</span><span>
</span><span id="line-165"></span><span class="hs-comment">--</span><span>
</span><span id="line-166"></span><span class="hs-comment">-- This function returns 'True' if its argument has one of the</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- following 'GeneralCategory's, or 'False' otherwise:</span><span>
</span><span id="line-168"></span><span class="hs-comment">--</span><span>
</span><span id="line-169"></span><span class="hs-comment">-- * 'NonSpacingMark'</span><span>
</span><span id="line-170"></span><span class="hs-comment">-- * 'SpacingCombiningMark'</span><span>
</span><span id="line-171"></span><span class="hs-comment">-- * 'EnclosingMark'</span><span>
</span><span id="line-172"></span><span class="hs-comment">--</span><span>
</span><span id="line-173"></span><span class="hs-comment">-- These classes are defined in the</span><span>
</span><span id="line-174"></span><span class="hs-comment">-- &lt;http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_Table Unicode Character Database&gt;,</span><span>
</span><span id="line-175"></span><span class="hs-comment">-- part of the Unicode standard. The same document defines what is</span><span>
</span><span id="line-176"></span><span class="hs-comment">-- and is not a \&quot;Mark\&quot;.</span><span>
</span><span id="line-177"></span><span class="hs-comment">--</span><span>
</span><span id="line-178"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-179"></span><span class="hs-comment">--</span><span>
</span><span id="line-180"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-181"></span><span class="hs-comment">--</span><span>
</span><span id="line-182"></span><span class="hs-comment">-- &gt;&gt;&gt; isMark 'a'</span><span>
</span><span id="line-183"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-184"></span><span class="hs-comment">-- &gt;&gt;&gt; isMark '0'</span><span>
</span><span id="line-185"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-186"></span><span class="hs-comment">--</span><span>
</span><span id="line-187"></span><span class="hs-comment">-- Combining marks such as accent characters usually need to follow</span><span>
</span><span id="line-188"></span><span class="hs-comment">-- another character before they become printable:</span><span>
</span><span id="line-189"></span><span class="hs-comment">--</span><span>
</span><span id="line-190"></span><span class="hs-comment">-- &gt;&gt;&gt; map isMark &quot;o&#768;&quot;</span><span>
</span><span id="line-191"></span><span class="hs-comment">-- [False,True]</span><span>
</span><span id="line-192"></span><span class="hs-comment">--</span><span>
</span><span id="line-193"></span><span class="hs-comment">-- Puns are not necessarily supported:</span><span>
</span><span id="line-194"></span><span class="hs-comment">--</span><span>
</span><span id="line-195"></span><span class="hs-comment">-- &gt;&gt;&gt; isMark '&#10003;'</span><span>
</span><span id="line-196"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-197"></span><span class="hs-comment">--</span><span>
</span><span id="line-198"></span><span class="annot"><a href="Data.Char.html#isMark"><span class="hs-identifier hs-type">isMark</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-199"></span><span id="isMark"><span class="annot"><span class="annottext">isMark :: Char -&gt; Bool
</span><a href="Data.Char.html#isMark"><span class="hs-identifier hs-var hs-var">isMark</span></a></span></span><span> </span><span id="local-6989586621679533606"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533606"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char -&gt; GeneralCategory
</span><a href="GHC.Unicode.html#generalCategory"><span class="hs-identifier hs-var">generalCategory</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533606"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-200"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#NonSpacingMark"><span class="hs-identifier hs-var">NonSpacingMark</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-201"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#SpacingCombiningMark"><span class="hs-identifier hs-var">SpacingCombiningMark</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-202"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#EnclosingMark"><span class="hs-identifier hs-var">EnclosingMark</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-203"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><span class="hs-identifier">_</span></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="hs-comment">-- | Selects Unicode numeric characters, including digits from various</span><span>
</span><span id="line-206"></span><span class="hs-comment">-- scripts, Roman numerals, et cetera.</span><span>
</span><span id="line-207"></span><span class="hs-comment">--</span><span>
</span><span id="line-208"></span><span class="hs-comment">-- This function returns 'True' if its argument has one of the</span><span>
</span><span id="line-209"></span><span class="hs-comment">-- following 'GeneralCategory's, or 'False' otherwise:</span><span>
</span><span id="line-210"></span><span class="hs-comment">--</span><span>
</span><span id="line-211"></span><span class="hs-comment">-- * 'DecimalNumber'</span><span>
</span><span id="line-212"></span><span class="hs-comment">-- * 'LetterNumber'</span><span>
</span><span id="line-213"></span><span class="hs-comment">-- * 'OtherNumber'</span><span>
</span><span id="line-214"></span><span class="hs-comment">--</span><span>
</span><span id="line-215"></span><span class="hs-comment">-- These classes are defined in the</span><span>
</span><span id="line-216"></span><span class="hs-comment">-- &lt;http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_Table Unicode Character Database&gt;,</span><span>
</span><span id="line-217"></span><span class="hs-comment">-- part of the Unicode standard. The same document defines what is</span><span>
</span><span id="line-218"></span><span class="hs-comment">-- and is not a \&quot;Number\&quot;.</span><span>
</span><span id="line-219"></span><span class="hs-comment">--</span><span>
</span><span id="line-220"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-221"></span><span class="hs-comment">--</span><span>
</span><span id="line-222"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-223"></span><span class="hs-comment">--</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- &gt;&gt;&gt; isNumber 'a'</span><span>
</span><span id="line-225"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-226"></span><span class="hs-comment">-- &gt;&gt;&gt; isNumber '%'</span><span>
</span><span id="line-227"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-228"></span><span class="hs-comment">-- &gt;&gt;&gt; isNumber '3'</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-230"></span><span class="hs-comment">--</span><span>
</span><span id="line-231"></span><span class="hs-comment">-- ASCII @\'0\'@ through @\'9\'@ are all numbers:</span><span>
</span><span id="line-232"></span><span class="hs-comment">--</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- &gt;&gt;&gt; and $ map isNumber ['0'..'9']</span><span>
</span><span id="line-234"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-235"></span><span class="hs-comment">--</span><span>
</span><span id="line-236"></span><span class="hs-comment">-- Unicode Roman numerals are \&quot;numbers\&quot; as well:</span><span>
</span><span id="line-237"></span><span class="hs-comment">--</span><span>
</span><span id="line-238"></span><span class="hs-comment">-- &gt;&gt;&gt; isNumber '&#8552;'</span><span>
</span><span id="line-239"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-240"></span><span class="hs-comment">--</span><span>
</span><span id="line-241"></span><span class="annot"><a href="Data.Char.html#isNumber"><span class="hs-identifier hs-type">isNumber</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-242"></span><span id="isNumber"><span class="annot"><span class="annottext">isNumber :: Char -&gt; Bool
</span><a href="Data.Char.html#isNumber"><span class="hs-identifier hs-var hs-var">isNumber</span></a></span></span><span> </span><span id="local-6989586621679533602"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533602"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char -&gt; GeneralCategory
</span><a href="GHC.Unicode.html#generalCategory"><span class="hs-identifier hs-var">generalCategory</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533602"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-243"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#DecimalNumber"><span class="hs-identifier hs-var">DecimalNumber</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-244"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#LetterNumber"><span class="hs-identifier hs-var">LetterNumber</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-245"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#OtherNumber"><span class="hs-identifier hs-var">OtherNumber</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-246"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><span class="hs-identifier">_</span></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span class="hs-comment">-- | Selects Unicode space and separator characters.</span><span>
</span><span id="line-249"></span><span class="hs-comment">--</span><span>
</span><span id="line-250"></span><span class="hs-comment">-- This function returns 'True' if its argument has one of the</span><span>
</span><span id="line-251"></span><span class="hs-comment">-- following 'GeneralCategory's, or 'False' otherwise:</span><span>
</span><span id="line-252"></span><span class="hs-comment">--</span><span>
</span><span id="line-253"></span><span class="hs-comment">-- * 'Space'</span><span>
</span><span id="line-254"></span><span class="hs-comment">-- * 'LineSeparator'</span><span>
</span><span id="line-255"></span><span class="hs-comment">-- * 'ParagraphSeparator'</span><span>
</span><span id="line-256"></span><span class="hs-comment">--</span><span>
</span><span id="line-257"></span><span class="hs-comment">-- These classes are defined in the</span><span>
</span><span id="line-258"></span><span class="hs-comment">-- &lt;http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_Table Unicode Character Database&gt;,</span><span>
</span><span id="line-259"></span><span class="hs-comment">-- part of the Unicode standard. The same document defines what is</span><span>
</span><span id="line-260"></span><span class="hs-comment">-- and is not a \&quot;Separator\&quot;.</span><span>
</span><span id="line-261"></span><span class="hs-comment">--</span><span>
</span><span id="line-262"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-263"></span><span class="hs-comment">--</span><span>
</span><span id="line-264"></span><span class="hs-comment">-- Basic usage:</span><span>
</span><span id="line-265"></span><span class="hs-comment">--</span><span>
</span><span id="line-266"></span><span class="hs-comment">-- &gt;&gt;&gt; isSeparator 'a'</span><span>
</span><span id="line-267"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-268"></span><span class="hs-comment">-- &gt;&gt;&gt; isSeparator '6'</span><span>
</span><span id="line-269"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-270"></span><span class="hs-comment">-- &gt;&gt;&gt; isSeparator ' '</span><span>
</span><span id="line-271"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-272"></span><span class="hs-comment">--</span><span>
</span><span id="line-273"></span><span class="hs-comment">-- Warning: newlines and tab characters are not considered</span><span>
</span><span id="line-274"></span><span class="hs-comment">-- separators.</span><span>
</span><span id="line-275"></span><span class="hs-comment">--</span><span>
</span><span id="line-276"></span><span class="hs-comment">-- &gt;&gt;&gt; isSeparator '\n'</span><span>
</span><span id="line-277"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-278"></span><span class="hs-comment">-- &gt;&gt;&gt; isSeparator '\t'</span><span>
</span><span id="line-279"></span><span class="hs-comment">-- False</span><span>
</span><span id="line-280"></span><span class="hs-comment">--</span><span>
</span><span id="line-281"></span><span class="hs-comment">-- But some more exotic characters are (like HTML's @&amp;nbsp;@):</span><span>
</span><span id="line-282"></span><span class="hs-comment">--</span><span>
</span><span id="line-283"></span><span class="hs-comment">-- &gt;&gt;&gt; isSeparator '\160'</span><span>
</span><span id="line-284"></span><span class="hs-comment">-- True</span><span>
</span><span id="line-285"></span><span class="hs-comment">--</span><span>
</span><span id="line-286"></span><span class="annot"><a href="Data.Char.html#isSeparator"><span class="hs-identifier hs-type">isSeparator</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-287"></span><span id="isSeparator"><span class="annot"><span class="annottext">isSeparator :: Char -&gt; Bool
</span><a href="Data.Char.html#isSeparator"><span class="hs-identifier hs-var hs-var">isSeparator</span></a></span></span><span> </span><span id="local-6989586621679533598"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533598"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char -&gt; GeneralCategory
</span><a href="GHC.Unicode.html#generalCategory"><span class="hs-identifier hs-var">generalCategory</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679533598"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-288"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#Space"><span class="hs-identifier hs-var">Space</span></a></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-289"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#LineSeparator"><span class="hs-identifier hs-var">LineSeparator</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-290"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#ParagraphSeparator"><span class="hs-identifier hs-var">ParagraphSeparator</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-291"></span><span>        </span><span class="annot"><span class="annottext">GeneralCategory
</span><span class="hs-identifier">_</span></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span></pre></body></html>